package cn.itcast.order.client;

import cn.itcast.order.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "userservice",fallback=UserFeignImpl.class)  //这里的value值是user-service项目的服务id
public interface UserFeign {

    @GetMapping("/user/{id}")
    public User queryById(@PathVariable("id") Long id);
}
